using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._DataManagementTools._Versions
{
    /// <summary>
    /// <para>Unregister As Versioned</para>
    /// <para>Unregisters an enterprise geodatabase dataset as versioned.</para>
    /// <para>取消将企业级地理数据库数据集注册为版本。</para>
    /// </summary>    
    [DisplayName("Unregister As Versioned")]
    public class UnregisterAsVersioned : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public UnregisterAsVersioned()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_dataset">
        /// <para>Input Dataset</para>
        /// <para>The name of the dataset to be unregistered as versioned.</para>
        /// <para>要取消注册为版本的数据集的名称。</para>
        /// </param>
        public UnregisterAsVersioned(object _in_dataset)
        {
            this._in_dataset = _in_dataset;
        }
        public override string ToolboxName => "Data Management Tools";

        public override string ToolName => "Unregister As Versioned";

        public override string CallName => "management.UnregisterAsVersioned";

        public override List<string> AcceptEnvironments => ["workspace"];

        public override object[] ParameterInfo => [_in_dataset, _keep_edit.GetGPValue(), _compress_default.GetGPValue(), _out_dataset];

        /// <summary>
        /// <para>Input Dataset</para>
        /// <para>The name of the dataset to be unregistered as versioned.</para>
        /// <para>要取消注册为版本的数据集的名称。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Dataset")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_dataset { get; set; }


        /// <summary>
        /// <para>Do not run if there are versions with edits</para>
        /// <para><xdoc>
        ///   <para>Specifies whether edits made to the versioned data will be maintained.</para>
        ///   <bulletList>
        ///     <bullet_item>Checked—If there are existing edits in the delta tables, the tool will fail with an error message. Do not use this option if you intend to compress your edits from the Default version in the Compress all edits in the Default version into the base table parameter. This is the default.</bullet_item><para/>
        ///     <bullet_item>Unchecked—If there are existing edits in the delta tables, the tool will allow deletion of these edits. Use this option if you intend to compress your edits from the Default version in the Compress all edits in the Default version into the base table parameter.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定是否保留对版本化数据所做的编辑。</para>
        ///   <bulletList>
        ///     <bullet_item>选中 - 如果增量表中存在现有编辑内容，则工具将失败并显示错误消息。如果打算将默认版本中的所有编辑压缩到基表参数中的默认版本中的编辑，请不要使用此选项。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>未选中 - 如果增量表中存在现有编辑内容，则该工具将允许删除这些编辑内容。如果要将“将默认版本中的所有编辑内容压缩到基表参数中”默认版本“中的编辑内容，请使用此选项。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Do not run if there are versions with edits")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _keep_edit_value _keep_edit { get; set; } = _keep_edit_value._true;

        public enum _keep_edit_value
        {
            /// <summary>
            /// <para>KEEP_EDIT</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("KEEP_EDIT")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>NO_KEEP_EDIT</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("NO_KEEP_EDIT")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Compress all edits in the Default version into the base table</para>
        /// <para><xdoc>
        ///   <para>Specifies whether edits will be compressed and unused data will be removed. This option is ignored if the Do not run if there are versions with edits parameter is checked.</para>
        ///   <para>
        ///     <bulletList>
        ///       <bullet_item>Checked—Edits in the Default version will be compressed to the base table.</bullet_item><para/>
        ///       <bullet_item>Unchecked—Any edits remaining in the delta tables will not be compressed. This is the default.</bullet_item><para/>
        ///     </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定是否压缩编辑内容并删除未使用的数据。如果选中了 Do not run if there are versions with edits（如果存在编辑的版本）参数，则忽略此选项。</para>
        ///   <para>
        ///     <bulletList>
        ///       <bullet_item>选中 - 默认版本中的编辑内容将被压缩到基表中。</bullet_item><para/>
        ///       <bullet_item>未选中 - 增量表中剩余的任何编辑内容都不会被压缩。这是默认设置。</bullet_item><para/>
        ///     </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Compress all edits in the Default version into the base table")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _compress_default_value _compress_default { get; set; } = _compress_default_value._false;

        public enum _compress_default_value
        {
            /// <summary>
            /// <para>COMPRESS_DEFAULT</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("COMPRESS_DEFAULT")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>NO_COMPRESS_DEFAULT</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("NO_COMPRESS_DEFAULT")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Unregistered Dataset</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Unregistered Dataset")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _out_dataset { get; set; }


        public UnregisterAsVersioned SetEnv(object workspace = null)
        {
            base.SetEnv(workspace: workspace);
            return this;
        }

    }

}